﻿/*****************************************************************//**
 * @file    FITKGraphObjectConstraintTie.h
 * @brief   Graph object for 'tie'.
 *
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-04-11
 *********************************************************************/

#ifndef __FITKGRAPHOBJECTCONSTRAINTTIE_H__
#define __FITKGRAPHOBJECTCONSTRAINTTIE_H__

#include "FITKGraphObjectInteractionBase.h"

#include "FITKVTKGraphAdaptorAPI.h"

// Forward declaration
class vtkPoints;
class vtkCellArray;
class vtkDoubleArray;
class vtkPolyData;

namespace Interface
{
    class FITKInteractionLocation;
    class FITKAbaConstraintTie;
}

namespace Exchange
{
    /**
     * @brief   Graph object for 'tie'.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2024-04-11
     */
    class FITKVTKGRAPHADAPTORAPI FITKGraphObjectConstraintTie : public FITKGraphObjectInteractionBase
    {
        // Regist
        FITKGraphObjectRegist(FITKGraphObjectConstraintTie, FITKGraphObjectInteractionBase);
        FITKCLASS(Exchange, FITKGraphObjectConstraintTie);

    public:
        /**
         * @brief   Constructor.
         * @param   caseData: The case data
         * @param   tieData: The tie data object
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-11
         */
        FITKGraphObjectConstraintTie(AbaqusData::FITKDataCase* caseData, Interface::FITKAbaConstraintTie* tieData);

        /**
         * @brief   Destructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-11
         */
        ~FITKGraphObjectConstraintTie() = default;

    protected:
        /**
         * @brief   Initialize.[override]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-11
         */
        void init() override;

        /**
         * @brief   Generate the poly data for the tie.[override]
         * @param   constraint: The constraint data object
         * @return  Is OK
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-19
         */
        bool generatePolyData(Interface::FITKInteractionLocation* constraint) override;

        /**
         * @brief   Generate tie actor.[override]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-19
         */
        void generateGraph() override;

    };
}   // namespace Exchange

#endif // __FITKGRAPHOBJECTCONSTRAINTTIE_H__
